Anv‰nda AppleScript med OmniWeb
MÂnga funktioner i OmniWeb kan styras med hj‰lp av AppleScript.
Du kan se alla OmniWeb-objekt som kan styras genom att visa programmets scripting dictionary (dvs. ordlistan). Detta gˆr du genom att dra OmniWeb-programmet till symbolen fˆr programmet Manusredigerare frÂn Apple. Detta program installeras som standard i /Applications/AppleScript/.
AppleScript-exempel
Detta manus flyttar alla flikar i ett webbl‰sarfˆnster till sina egna fˆnster.
tell application "OmniWeb"
†††††set theBrowser to front browser
†††††if (count tabs of theBrowser) > 1 then
††††††††††repeat until (count tabs of theBrowser) = 1
†††††††††††††††set theTab to second tab of theBrowser
†††††††††††††††set theAddress to address of theTab
†††††††††††††††make new browser at end of browsers with properties {address:theAddress}
†††††††††††††††delete theTab
††††††††††end repeat
†††††end if
†††††set has tabs of theBrowser to false
end tell
Detta manus skapar ett enda fˆnster med flikar fˆr alla flikar frÂn varje ˆppet fˆnster.
tell application "OmniWeb"
†††††set mainBrowser to front browser
†††††set frontID to id of front browser
†††††set background to (every browser whose id is not frontID)
†††††repeat with theBrowser in background
††††††††††set theAddress to address of theBrowser
††††††††††tell mainBrowser to make new tab at end of tabs with properties {address:theAddress}
††††††††††close theBrowser
†††††end repeat
end tell
Ytterligare AppleScript-manus fˆr OmniWeb finns tillg‰ngliga i avsnittet Extras p OmniWeb product pages p omnigroup.com.